package com.conop.gradient;

/**
 * An interface for convex sets
 * @author Alex Spivakovsky
 * @version 08/07/2012
 */
public interface ConvexSet 
{	
	/**
	 * Checks if <code>pnt</code> is within the convex set
	 * @param pnt - The point we check feasibility with
	 * @return True if <code>pnt</code> is within the convex set and false
	 * otherwise
	 */
	boolean isFeasible(NDPoint pnt);
	
	/**
	 * The solution to the problem min{||x-pnt||, x is in the convex set}
	 * @param pnt - The point we want to project
	 * @return An NDPoint which is the solution to the optimization problem
	 */
	NDPoint Projection(NDPoint pnt);
}
